package game.metalmax.packet.world {

	import flash.utils.ByteArray;
	
	import game.metalmax.packet.IPacket;

public class MoveHeroRequest implements  IPacket{

	// 帐号
	public var email:String;
	//移动坐标位置
	public var position:PPoint = null;

	public function write(out:ByteArray):void{
		var len:int = 0;
		var i:int = 0;
		out.writeUTF(email==null?"":email);
		out.writeByte(position==null?0:1);
		if(position!=null) position.write(out);
	}
	public function read(inn:ByteArray):void{
		var len:int = 0;
		var i:int = 0;
		email = inn.readUTF();
				if(inn.readByte() == 1){
position= new PPoint();
position.read(inn);
		}
}
}
}